<template>
  <div>
    <my-header></my-header>
    <router-view></router-view>
    <!--    在Home和Search下才显示-->
    <my-footer v-show="$route.meta.showFooter"></my-footer>
  </div>
</template>

<script>
import MyHeader from './components/MyHeader'
import MyFooter from "@/components/MyFooter";

export default {
  name: 'App',
  components: {MyFooter, MyHeader},
  mounted() {
    this.$store.dispatch('home/getCategoryList')//把请求放在这里，以便于优化请求发送次数
  }
}
</script>

<style>

</style>
